<template>
  <div class="container">
    <div class="c-header">
      <div class="header-left">
        <span class="name">{{ rowCache.village }}</span> <span>所属市县：</span
        ><span class="strong">{{ rowCache.city }}+{{ rowCache.country }}</span
        ><span>状态：</span
        ><span class="strong" v-if="rowCache.state==true">审核通过</span>
        <span class="strong" v-if="rowCache.state==false">审核未通过</span>
       
      </div>
      <div class="header-right">
        <button class="red" @click="back">返回</button>
        <button class="daochu">
          <img src="@/assets/daochu.png" alt="" /> <span>全部导出</span>
        </button>
      </div>
    </div>
    <div class="content">


      <table id="partnerTable"  style="width: 100%">
        <thead>
          <tr style="background-color:#4778c7;color:#fff;line-height:40px">
            <th style="width:350px">指标</th>
            <th style="width:200px">规划目标数①</th>
            <th style="width:200px">规划基期年②</th>
            <th style="width:200px">规划目标年③</th>
            <th style="width:200px">变化量（③—②）</th>
            <th style="width:200px">差值（③—①）</th>
            <th style="width:100px">属性</th>
            <th>备注</th>
          </tr>
        </thead>
        <tbody style="text-align:center;background-color:#fff">
          <tr v-for="(item1, index) in rowCache.json" :key="index" style="line-height:35px">
            <td>
              {{ item1.name }}
            </td>
            <td v-for="(item,index) in item1.value" :key="index">{{item}}</td>
            <td>
              {{ item1.att }}
            </td>
            <td>
              {{ item1.remarks }}
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </div>
</template>
<script>
import { getdata } from "@/api/index.js";
import { mapGetters } from "vuex";

export default {
  data() {
    return {
      tableData: [
        {
          v1: "耕地保有量（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "永久基本农田保护面积（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "生态保护红线面积（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "生态公益林面积（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "建设用地总面积（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "村庄建设用地规模（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "村庄公共管理与公共服务设施用地规模（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "村庄基础设施用地规模（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "规划留白指标（公顷）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
        {
          v1: "人均村庄建设用地面积（平方米）",
          v2: "",
          v3: "",
          v4: "",
          v5: "",
          v6: "",
          v7: "",
        },
      ],
    };
  },
  computed: {
    ...mapGetters(["rowCache"]),
  },
  components: {},
  mounted() {
    this.rowCache.json = JSON.parse(this.rowCache.json)
  },
  methods: {

    back() {
      this.$router.go("-1");
    },
  },
  beforeDestroy() {
  },
};
</script>
<style lang="scss" scoped>
@import "../../../../public/css/table.scss";
.container {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #f2f2f2;
}
.c-header {
  background-color: #fff;
  height: 55px;
  line-height: 55px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  .header-left {
    display: flex;
    align-items: center;
    span {
      margin-right: 10px;
      height: 40px;
      line-height: 40px;
    }
    .name {
      border-bottom: 2px solid #4778c7;
      margin-right: 15px;
    }
    .strong {
      color: #4778c7;
      font-size: 14px;
      font-weight: 700;
    }
  }
  .header-right {
    display: flex;
    align-items: center;
    button {
      height: 30px;
      line-height: 30px;
      text-align: center;
      margin-left: 10px;
      border-radius: 5px;
      color: #fff;
      border: none;
      padding: 0px 20px;
      font-weight: 400;
    }
    .red {
      background-color: #eeb4b4;
    }
    .green {
      background-color: #9acd32;
    }

    .daochu {
      display: flex;
      align-items: center;
      background-color: #4778c7;
      border-radius: 4px;
      height: 32px;
      margin-left: 15px;
      color: #fff;
      img {
        margin-right: 5px;
        width: 25px;
        height: 25px;
      }
    }
  }
}
.content {
  margin: 10px;
  position: relative;
  height: calc(100% - 55px);
  display: flex;
  justify-content: space-between;
}
.yellow {
  background-color: #eead0e;
  color: #fff;
}
</style>